import request from '@/util/request'
import store from '@/vuex/store'

//提交表单
export function addUploadApkFormApi(load) {
    const value = {
        appKey:'',
        appFlag:2,
        token: store.getters.token,
        versionCode:0,
        param: JSON.stringify(load)
    };
    return request({
        url: 'appUpload/addApp.do',
        method: 'post',
        data: value
    })
}
//后台系统查询列表
export function getAppListApi(list) {
    const value = {
        appKey:'',
        appFlag:2,
        token: store.getters.token,
        versionCode:0,
        param: JSON.stringify(list)
    }
    return request({
        url: 'appUpload/getAppList.do',
        method: 'post',
        data: value
    })
}

// 发布（状态为位发布的改为发布）
export function updateAppShowApi(list) {
    const value = {
        appKey:'',
        appFlag:2,
        token: store.getters.token,
        versionCode:0,
        param: JSON.stringify(list)
    }
    return request({
        url: 'appUpload/updateAppShow.do',
        method: 'post',
        data: value
    })
}

// 不发布（状态为位发布的改为不发布）
export function updateAppNotShowApi(list) {
    const value = {
        appKey:'',
        appFlag:2,
        token: store.getters.token,
        versionCode:0,
        param: JSON.stringify(list)
    }
    return request({
        url: 'appUpload/updateAppNotShow.do',
        method: 'post',
        data: value
    })
}